const path = require('path')
const fs = require('fs')
const cos = require('../../utils/cos')

const projectSrc = path.resolve(__dirname, '../../static')
const resolve = (route) => path.resolve(projectSrc, route)

const sms = (req, res) => {
  //   if(req.body.From != process.env.PERSONAL_NUMBER) return;
  console.log('send message ' + req.body.Body)

  const fileName = 'test.png'
  const fileObject = fs.createReadStream(resolve('test.png'))
  cos.uploadFile(fileName, fileObject)
  // const channel = client.channels.cache.get(friendsChannelId)
  // channel.send('/imagine a baby dog.')
}

module.exports = sms
